<?php

use yii\db\Migration;

/**
 * Handles the creation of table `examine_workflow`.
 */
class m171102_083438_create_examine_workflow_table extends Migration
{
    /**
     * @inheritdoc
     * 审批流程定义
     */
    public function up()
    {
        $this->createTable('examine_workflow', [
            'id' => $this->primaryKey(),
            'title' => $this->smallInteger()->defaultValue(1)->comment('审批名称'),//1立项审批 2投资审批 3盘活审批 4处置审批 5申请访问
            'method' => $this->smallInteger()->defaultValue(1)->comment('审批方式'),//1逐级审批 2会签审批 3或签审批 4逐级会签 5逐级或签
            'reviewer' => $this->text()->comment('审批人'),//逐级审批 json_encode() [1=>'审批人1',2=>'审批人2',]，会签、或签审批{'审批人1','审批人2',]
            'copy_to' => $this->text()->comment('抄送'),//
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('examine_workflow');
    }
}
